package com.bruce.mapper;

import com.bruce.domain.Role;
import com.bruce.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    public List<User> findAll();

    void save(User user);

    // 需要封装参数变成一个对象，尝试注解
    void saveUserRoleRel(@Param("userId") Long userId, @Param("roleIdList") Long[] roleIds);

    void delUserRoleRel(Long userId);

    void del(Long userId);

    User findByUsernameAndPassword(@Param("name") String username, @Param("passwd") String password);
}
